<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <div id="app">
      <mycom></mycom>
      <mycom2></mycom2>
      <mycom3></mycom3>
    </div>
    <div id="#app2">
      <mycom></mycom>
      <mycom2></mycom2>
    </div>
    <template id="mycom">
      <h1>hello component</h1>
    </template>
  </body>
  <script src="vue.js"></script>
  <script>
    Vue.component('mycom', {
      template: '#mycom'
    })
    var vm = new Vue({
      el: '#app',
      components: {
        mycom2 :{
          template: "#mycom2"
        },
        mycom3: {
          template: '<h1> hello component 3</h1>'
        }
      },

    })
  </script>
  <script>
    var vm = new Vue({
      el: '#app'
    })
  </script>
</html>
